using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.Modeling;
using EastBancTech.InstallerDefinition;

namespace WixPackageDsl.Helper
{
    static public class ModelHelper
    {
        static public T FindElementsByName<T>(Store store, String name) where T : NamedElement
        {
            foreach (T ws in store.ElementDirectory.FindElements<T>())
            {
                if (String.Compare(ws.Name, name, true) == 0)
                {
                    return ws;
                }
            }

            return default(T);
        }
    }
}
